package com.caiden_micheal.user.service;

import com.caiden_micheal.base.domain.AjxResult;
import com.caiden_micheal.base.dto.PageDTO;
import com.caiden_micheal.user.domain.User;
import com.caiden_micheal.user.vo.*;

import java.util.List;

public interface UserService {
    User findByUserName(String username);

    User findByUserId(Long id);

    User findByEmail(String email);

    void registerUser(RegisterVO registerVO);

    Integer validEmailAndUserNameRepeat(String username, String email);

    void activeUsreById(Long id);

    void delUserById(Long id);

    List<String> findUserAuthorityNameListByUserId(Long id, Boolean forcedRefresh);

    void userOnlineStatusSet(Long id, String flag);

    PageDTO findUsersByCondition(UserQueryVO userQueryVO);

    PageDTO findUsersByExcludePositionCondition(UserQueryVO userQueryVO);

    PageDTO findUsersByPositionCondition(UserQueryVO userQueryVO);

    PageDTO findUsersByConditionPermission(UserQueryVO userQueryVO);

    PageDTO findUsersExcludeConditionPermission(UserQueryVO userQueryVO);

    AjxResult addUserPermission(AddUserPermissionVO addUserPermissionVO);

    AjxResult removeUserPermission(RemoveUserPermissionVO removeUserPermissionVO);

    AjxResult addUser(UserAddVO userAddVO);

    AjxResult findUserDecryptDataById(Long userId);

    AjxResult editUser(UserEditVO userEditVO);

    AjxResult userRemoveAuthority(RemoveUserPermissionVO removeUserPermissionVO);

    AjxResult userAddPermission(UserAddPermissionVO userAddPermissionVO);
}
